﻿package mortal.game.view.best.panel
{
    import Message.DB.Tables.*;
    import Message.Public.*;
    import __AS3__.vec.*;
    import com.gengine.core.frame.*;
    import com.gengine.utils.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.controls.*;
    import flash.events.*;
    import flash.utils.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;
    import mortal.game.view.best.*;
    import mortal.game.view.common.*;
    import mortal.game.view.palyer.data.*;
    import mortal.mvc.core.*;

    public class BestNewInfoPanel extends GSprite
    {
        private var _contentContainer:GSprite;
        private var _pane:GScrollPane;
        private var txtList:Vector.<GTextFiled>;
        private var txtDesObj:Dictionary;
        private var mountsInfoTxt:GTextFiled;
        private var mountsInfoTxtDes:GTextFiled;
        private var mountsInfoTxt2:GTextFiled;
        private var mountsInfoTxt2Des:GTextFiled;
        private var mountsInfoTxt1:GTextFiled;
        private var mountsInfoTxt1Des:GTextFiled;
        private var mountsInfoTxt3:GTextFiled;
        private var mountsInfoTxt3Des:GTextFiled;
        private var mountsInfoTxt4:GTextFiled;
        private var mountsInfoTxt4Des:GTextFiled;
        private var mountsInfoTxt5:GTextFiled;
        private var mountsInfoTxt5Des:GTextFiled;
        private var mountsInfoTxt6:GTextFiled;
        private var mountsInfoTxt6Des:GTextFiled;
        private var mountsInfoTxt7:GTextFiled;
        private var mountsInfoTxt7Des:GTextFiled;
        private var mountsInfoTxt8:GTextFiled;
        private var mountsInfoTxt8Des:GTextFiled;
        private var mountsInfoTxt9:GTextFiled;
        private var mountsInfoTxt9Des:GTextFiled;
        private var equipsInfoTxt:GTextFiled;
        private var equipsInfoTxtDes:GTextFiled;
        private var gemsInfoTxt:GTextFiled;
        private var gemsInfoTxtDes:GTextFiled;
        private var wizardsInfoTxt:GTextFiled;
        private var wizardsInfoTxtDes:GTextFiled;
        private var skillsInfoTxt:GTextFiled;
        private var skillsInfoTxtDes:GTextFiled;
        private var petsInfoTxt:GTextFiled;
        private var petsInfoTxtDes:GTextFiled;
        private var shopInfoTxt:GTextFiled;
        private var shopInfoTxtDes:GTextFiled;
        private var cityTaxInfoTxt:GTextFiled;
        private var cityTaxInfoTxtDes:GTextFiled;
        private var expCopyInfoTxt:GTextFiled;
        private var expCopyInfoTxtDes:GTextFiled;
        private var _frame:SecTimer;
        private var _petFrame:SecTimer;
        private var _frameObj:Object;
        private var _totalFrame:SecTimer;
        private var _pressDes:String = "";
        private var _pressDesObj:Object;
        private var _petPressDes:String = "";
        private var funObj:Object;
        private var baseIndex:int = 10;

        public function BestNewInfoPanel()
        {
            this.txtDesObj = new Dictionary(false);
            this._frameObj = {};
            this._pressDesObj = {};
            this.funObj = {};
            this.initFunObj();
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._contentContainer = UICompomentPool.getUICompoment(GSprite);
            this._pane = UIFactory.gScrollPanel(0, 0, 208, 110, this);
            this._pane.styleName = "chatScrollPane";
            this._pane.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._pane.verticalScrollPolicy = ScrollPolicy.AUTO;
            this._pane.source = this._contentContainer;
            this.mountsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70819), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxtDes.visible = false;
            this.mountsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt.wordWrap = true;
            this.mountsInfoTxt.multiline = true;
            this.mountsInfoTxt.visible = false;
            this.txtDesObj[this.mountsInfoTxt] = this.mountsInfoTxtDes;
            this.mountsInfoTxt2Des = UIFactory.gTextField("" + Language.getString(70832), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt2Des.visible = false;
            this.mountsInfoTxt2 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt2.wordWrap = true;
            this.mountsInfoTxt2.multiline = true;
            this.mountsInfoTxt2.visible = false;
            this.txtDesObj[this.mountsInfoTxt2] = this.mountsInfoTxt2Des;
            this.mountsInfoTxt1Des = UIFactory.gTextField("" + Language.getString(70833), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt1Des.visible = false;
            this.mountsInfoTxt1 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt1.wordWrap = true;
            this.mountsInfoTxt1.multiline = true;
            this.mountsInfoTxt1.visible = false;
            this.txtDesObj[this.mountsInfoTxt1] = this.mountsInfoTxt1Des;
            this.mountsInfoTxt3Des = UIFactory.gTextField("" + Language.getString(70834), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt3Des.visible = false;
            this.mountsInfoTxt3 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt3.wordWrap = true;
            this.mountsInfoTxt3.multiline = true;
            this.mountsInfoTxt3.visible = false;
            this.txtDesObj[this.mountsInfoTxt3] = this.mountsInfoTxt3Des;
            this.mountsInfoTxt4Des = UIFactory.gTextField("" + Language.getString(70835), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt4Des.visible = false;
            this.mountsInfoTxt4 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt4.wordWrap = true;
            this.mountsInfoTxt4.multiline = true;
            this.mountsInfoTxt4.visible = false;
            this.txtDesObj[this.mountsInfoTxt4] = this.mountsInfoTxt4Des;
            this.mountsInfoTxt5Des = UIFactory.gTextField("" + Language.getString(70836), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt5Des.visible = false;
            this.mountsInfoTxt5 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt5.wordWrap = true;
            this.mountsInfoTxt5.multiline = true;
            this.mountsInfoTxt5.visible = false;
            this.txtDesObj[this.mountsInfoTxt5] = this.mountsInfoTxt5Des;
            this.mountsInfoTxt6Des = UIFactory.gTextField("" + Language.getString(70837), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt6Des.visible = false;
            this.mountsInfoTxt6 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt6.wordWrap = true;
            this.mountsInfoTxt6.multiline = true;
            this.mountsInfoTxt6.visible = false;
            this.txtDesObj[this.mountsInfoTxt6] = this.mountsInfoTxt6Des;
            this.mountsInfoTxt7Des = UIFactory.gTextField("" + Language.getString(70838), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt7Des.visible = false;
            this.mountsInfoTxt7 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt7.wordWrap = true;
            this.mountsInfoTxt7.multiline = true;
            this.mountsInfoTxt7.visible = false;
            this.txtDesObj[this.mountsInfoTxt7] = this.mountsInfoTxt7Des;
            this.mountsInfoTxt8Des = UIFactory.gTextField("" + Language.getString(70839), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt8Des.visible = false;
            this.mountsInfoTxt8 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt8.wordWrap = true;
            this.mountsInfoTxt8.multiline = true;
            this.mountsInfoTxt8.visible = false;
            this.txtDesObj[this.mountsInfoTxt8] = this.mountsInfoTxt8Des;
            this.mountsInfoTxt9Des = UIFactory.gTextField("" + Language.getString(70840), 0, 40, 195, 40, this._contentContainer, null, true);
            this.mountsInfoTxt9Des.visible = false;
            this.mountsInfoTxt9 = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.mountsInfoTxt9.wordWrap = true;
            this.mountsInfoTxt9.multiline = true;
            this.mountsInfoTxt9.visible = false;
            this.txtDesObj[this.mountsInfoTxt9] = this.mountsInfoTxt9Des;
            this.equipsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70820), 0, 40, 195, 40, this._contentContainer, null, true);
            this.equipsInfoTxtDes.visible = false;
            this.equipsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.equipsInfoTxt] = this.equipsInfoTxtDes;
            this.gemsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70821), 0, 40, 195, 40, this._contentContainer, null, true);
            this.gemsInfoTxtDes.visible = false;
            this.gemsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.gemsInfoTxt] = this.gemsInfoTxtDes;
            this.wizardsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70822), 0, 40, 195, 40, this._contentContainer, null, true);
            this.wizardsInfoTxtDes.visible = false;
            this.wizardsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.wizardsInfoTxt] = this.wizardsInfoTxtDes;
            this.skillsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70823), 48, 40, 195, 40, this._contentContainer, null, true);
            this.skillsInfoTxtDes.visible = false;
            this.skillsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.skillsInfoTxt] = this.skillsInfoTxtDes;
            this.petsInfoTxtDes = UIFactory.gTextField("" + Language.getString(70823), 0, 40, 195, 40, this._contentContainer, null, true);
            this.petsInfoTxtDes.visible = false;
            this.petsInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.petsInfoTxt] = this.petsInfoTxtDes;
            this.shopInfoTxtDes = UIFactory.gTextField("" + Language.getString(70841), 0, 40, 195, 40, this._contentContainer, null, true);
            this.shopInfoTxtDes.visible = false;
            this.shopInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.shopInfoTxt] = this.shopInfoTxtDes;
            this.cityTaxInfoTxtDes = UIFactory.gTextField("" + Language.getString(70841), 0, 40, 195, 40, this._contentContainer, null, true);
            this.cityTaxInfoTxtDes.visible = false;
            this.cityTaxInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.cityTaxInfoTxt] = this.cityTaxInfoTxtDes;
            this.expCopyInfoTxtDes = UIFactory.gTextField("" + Language.getString(70841), 0, 40, 195, 40, this._contentContainer, null, true);
            this.expCopyInfoTxtDes.visible = false;
            this.expCopyInfoTxt = UIFactory.gTextField("", 48, 40, 140, 40, this._contentContainer, null, true);
            this.txtDesObj[this.expCopyInfoTxt] = this.expCopyInfoTxtDes;
            this.equipsInfoTxt.visible = false;
            this.gemsInfoTxt.visible = false;
            this.wizardsInfoTxt.visible = false;
            this.skillsInfoTxt.visible = false;
            this.petsInfoTxt.visible = false;
            this.shopInfoTxt.visible = false;
            this.cityTaxInfoTxt.visible = false;
            this.expCopyInfoTxtDes.visible = false;
            this.txtList = new Vector.<GTextFiled>;
            this.txtList.push(this.mountsInfoTxt, this.mountsInfoTxt2, this.mountsInfoTxt1, this.mountsInfoTxt3, this.mountsInfoTxt4, this.mountsInfoTxt5, this.mountsInfoTxt6, this.mountsInfoTxt7, this.mountsInfoTxt8, this.mountsInfoTxt9, this.equipsInfoTxt, this.gemsInfoTxt, this.wizardsInfoTxt, this.skillsInfoTxt, this.petsInfoTxt, this.shopInfoTxt, this.cityTaxInfoTxt, this.expCopyInfoTxt);
            var _loc_1:int = 0;
            while (_loc_1 < this.txtList.length)
            {
                
                this.txtList[_loc_1].configEventListener(TextEvent.LINK, this.clickTxt);
                this.txtList[_loc_1].wordWrap = true;
                _loc_1++;
            }
            this._frame = new SecTimer(1);
            this._frame.addListener(TimerType.ENTERFRAME, this.onEnterFrameHandler);
            this._petFrame = new SecTimer(1);
            this._petFrame.addListener(TimerType.ENTERFRAME, this.onPetEnterFrameHandler);
            this._totalFrame = new SecTimer(60);
            this._totalFrame.addListener(TimerType.ENTERFRAME, this.fresh60S);
            this._totalFrame.start();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            var _loc_2:SecTimer = null;
            super.disposeImpl(param1);
            this.mountsInfoTxt = this.mountsInfoTxt && this.mountsInfoTxt.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt1 = this.mountsInfoTxt1 && this.mountsInfoTxt1.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt2 = this.mountsInfoTxt2 && this.mountsInfoTxt2.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt3 = this.mountsInfoTxt3 && this.mountsInfoTxt3.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt4 = this.mountsInfoTxt4 && this.mountsInfoTxt4.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt5 = this.mountsInfoTxt5 && this.mountsInfoTxt5.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt6 = this.mountsInfoTxt6 && this.mountsInfoTxt6.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt7 = this.mountsInfoTxt6 && this.mountsInfoTxt7.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt8 = this.mountsInfoTxt6 && this.mountsInfoTxt8.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt9 = this.mountsInfoTxt6 && this.mountsInfoTxt9.dispose(param1) ? (null) : (null);
            this.mountsInfoTxtDes = this.mountsInfoTxtDes && this.mountsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt1Des = this.mountsInfoTxt1Des && this.mountsInfoTxt1Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt2Des = this.mountsInfoTxt2Des && this.mountsInfoTxt2Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt3Des = this.mountsInfoTxt3Des && this.mountsInfoTxt3Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt4Des = this.mountsInfoTxt4Des && this.mountsInfoTxt4Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt5Des = this.mountsInfoTxt5Des && this.mountsInfoTxt5Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt6Des = this.mountsInfoTxt6Des && this.mountsInfoTxt6Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt7Des = this.mountsInfoTxt6Des && this.mountsInfoTxt7Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt8Des = this.mountsInfoTxt6Des && this.mountsInfoTxt8Des.dispose(param1) ? (null) : (null);
            this.mountsInfoTxt9Des = this.mountsInfoTxt6Des && this.mountsInfoTxt9Des.dispose(param1) ? (null) : (null);
            this.equipsInfoTxt = this.equipsInfoTxt && this.equipsInfoTxt.dispose(param1) ? (null) : (null);
            this.gemsInfoTxt = this.gemsInfoTxt && this.gemsInfoTxt.dispose(param1) ? (null) : (null);
            this.wizardsInfoTxt = this.wizardsInfoTxt && this.wizardsInfoTxt.dispose(param1) ? (null) : (null);
            this.skillsInfoTxt = this.skillsInfoTxt && this.skillsInfoTxt.dispose(param1) ? (null) : (null);
            this.petsInfoTxt = this.petsInfoTxt && this.petsInfoTxt.dispose(param1) ? (null) : (null);
            this.shopInfoTxt = this.shopInfoTxt && this.shopInfoTxt.dispose(param1) ? (null) : (null);
            this.cityTaxInfoTxt = this.cityTaxInfoTxt && this.cityTaxInfoTxt.dispose(param1) ? (null) : (null);
            this.expCopyInfoTxt = this.expCopyInfoTxt && this.expCopyInfoTxt.dispose(param1) ? (null) : (null);
            this.equipsInfoTxtDes = this.equipsInfoTxtDes && this.equipsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.gemsInfoTxtDes = this.gemsInfoTxtDes && this.gemsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.wizardsInfoTxtDes = this.wizardsInfoTxtDes && this.wizardsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.skillsInfoTxtDes = this.skillsInfoTxtDes && this.skillsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.petsInfoTxtDes = this.petsInfoTxtDes && this.petsInfoTxtDes.dispose(param1) ? (null) : (null);
            this.shopInfoTxtDes = this.shopInfoTxtDes && this.shopInfoTxtDes.dispose(param1) ? (null) : (null);
            this.cityTaxInfoTxtDes = this.cityTaxInfoTxtDes && this.cityTaxInfoTxtDes.dispose(param1) ? (null) : (null);
            this.expCopyInfoTxtDes = this.expCopyInfoTxtDes && this.expCopyInfoTxtDes.dispose(param1) ? (null) : (null);
            this.txtList = null;
            this.txtDesObj = new Dictionary(false);
            this._contentContainer.dispose(param1);
            this._contentContainer = null;
            this._pane.dispose(param1);
            this._pane = null;
            this._frame.dispose(param1);
            this._frame = null;
            this._petFrame.dispose(param1);
            this._petFrame = null;
            for each (_loc_2 in this._frameObj)
            {
                
                if (_loc_2)
                {
                    _loc_2.dispose(param1);
                    _loc_2 = null;
                }
            }
            this._frameObj = {};
            this._totalFrame.dispose(param1);
            this._totalFrame = null;
            return;
        }// end function

        private function clickTxt(event:TextEvent) : void
        {
            var _loc_3:Object = null;
            var _loc_2:String = "";
            var _loc_4:* = event.currentTarget as GTextFiled;
            switch(_loc_4)
            {
                case this.mountsInfoTxt:
                {
                    _loc_2 = "mountsInfoTxt";
                    break;
                }
                case this.mountsInfoTxt1:
                {
                    _loc_2 = "mountsInfoTxt1";
                    break;
                }
                case this.mountsInfoTxt2:
                {
                    _loc_2 = "mountsInfoTxt2";
                    break;
                }
                case this.mountsInfoTxt3:
                {
                    _loc_2 = "mountsInfoTxt3";
                    break;
                }
                case this.mountsInfoTxt4:
                {
                    _loc_2 = "mountsInfoTxt4";
                    break;
                }
                case this.mountsInfoTxt5:
                {
                    _loc_2 = "mountsInfoTxt5";
                    break;
                }
                case this.mountsInfoTxt6:
                {
                    _loc_2 = "mountsInfoTxt6";
                    break;
                }
                case this.mountsInfoTxt7:
                {
                    _loc_2 = "mountsInfoTxt7";
                    break;
                }
                case this.mountsInfoTxt8:
                {
                    _loc_2 = "mountsInfoTxt8";
                    break;
                }
                case this.mountsInfoTxt9:
                {
                    _loc_2 = "mountsInfoTxt9";
                    break;
                }
                case this.equipsInfoTxt:
                {
                    _loc_2 = "equipsInfoTxt";
                    break;
                }
                case this.gemsInfoTxt:
                {
                    _loc_2 = "gemsInfoTxt";
                    break;
                }
                case this.wizardsInfoTxt:
                {
                    _loc_2 = "wizardsInfoTxt";
                    break;
                }
                case this.skillsInfoTxt:
                {
                    _loc_2 = "skillsInfoTxt";
                    break;
                }
                case this.petsInfoTxt:
                {
                    _loc_2 = "petsInfoTxt";
                    break;
                }
                case this.shopInfoTxt:
                {
                    _loc_2 = "shopInfoTxt";
                    break;
                }
                case this.cityTaxInfoTxt:
                {
                    _loc_2 = "cityTaxInfoTxt";
                    break;
                }
                case this.expCopyInfoTxt:
                {
                    _loc_2 = "expCopyInfoTxt";
                    break;
                }
                default:
                {
                    break;
                }
            }
            _loc_3 = _loc_4.Data;
            Dispatcher.dispatchEvent(new DataEvent(EventName.BestTextClick, {openStr:_loc_2, dataObj:_loc_3}));
            return;
        }// end function

        public function set barAlpha(param1:Number) : void
        {
            this._pane.verticalScrollBar.alpha = param1;
            return;
        }// end function

        public function refresh() : void
        {
            if (this.checkLevelEnougth() == false)
            {
                return;
            }
            this.freshMount(false);
            this.updateWPC(false);
            this.freshEquip(false);
            this.freshGem(false);
            this.freshWizards(false);
            this.freshSkill(false);
            this.freshPet(false);
            this.freshShop(false);
            this.freshCityTax(false);
            this.freshExpCopy(false);
            this.relayout();
            return;
        }// end function

        public function freshMount(param1:Boolean = true) : void
        {
            var _loc_2:* = BestUtil.getMountsInfo();
            var _loc_3:* = _loc_2[0];
            this.mountsInfoTxt.visible = _loc_2[0];
            this.mountsInfoTxtDes.visible = _loc_3;
            this.mountsInfoTxtDes.htmlText = _loc_2[4];
            if (_loc_2[3])
            {
                this._frame.start();
            }
            else
            {
                this._frame.stop();
            }
            if (_loc_2[0])
            {
                if (_loc_2[3])
                {
                    this.mountsInfoTxt.htmlText = "" + _loc_2[1] + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getMountLeftTime(), "#ff0000");
                }
                else
                {
                    this.mountsInfoTxt.htmlText = "" + _loc_2[1];
                }
                this.mountsInfoTxt.Data = _loc_2[2];
                this._pressDes = _loc_2[1];
            }
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        private function onEnterFrameHandler(param1:SecTimer) : void
        {
            var _loc_2:* = Cache.instance.mount.mountData.sPublicMount.bless;
            if (_loc_2 > 0 && Cache.instance.mount.mountData.tMountConfig.code > 2)
            {
                this.mountsInfoTxt.htmlText = this._pressDes + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getMountLeftTime(), "#ff0000");
            }
            else
            {
                this.refresh();
            }
            return;
        }// end function

        private function onPetEnterFrameHandler(param1:SecTimer) : void
        {
            var _loc_2:* = Cache.instance.newPet.pet.bless;
            var _loc_3:* = PetUtil.getPetCfg();
            if (_loc_3 && _loc_2 > 0 && _loc_3.blessClear)
            {
                this.petsInfoTxt.htmlText = this._petPressDes + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getPetLeftTime(), "#ff0000");
            }
            else
            {
                this.refresh();
            }
            this.checkPetBlessOverTime();
            return;
        }// end function

        private function checkPetBlessOverTime() : void
        {
            if (BestUtil.getPetBlessTime() <= 0)
            {
                Cache.instance.newPet.pet.bless = 0;
                this.freshPet(true);
            }
            return;
        }// end function

        public function updateWPC(param1:Boolean = true) : void
        {
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeClothes, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeWing, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeWeapon, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeFightSoul, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeFightMethod, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeDragonSoul, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeHolyBook, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeWarShield, false);
            this.freshWPC(EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul, false);
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        private function onEnterF1(param1:SecTimer) : void
        {
            this.enframHdBase(1);
            return;
        }// end function

        private function onEnterF2(param1:SecTimer) : void
        {
            this.enframHdBase(2);
            return;
        }// end function

        private function onEnterF3(param1:SecTimer) : void
        {
            this.enframHdBase(3);
            return;
        }// end function

        private function onEnterF4(param1:SecTimer) : void
        {
            this.enframHdBase(4);
            return;
        }// end function

        private function onEnterF5(param1:SecTimer) : void
        {
            this.enframHdBase(5);
            return;
        }// end function

        private function onEnterF6(param1:SecTimer) : void
        {
            this.enframHdBase(6);
            return;
        }// end function

        private function onEnterF7(param1:SecTimer) : void
        {
            this.enframHdBase(7);
            return;
        }// end function

        private function onEnterF8(param1:SecTimer) : void
        {
            this.enframHdBase(8);
            return;
        }// end function

        private function onEnterF9(param1:SecTimer) : void
        {
            this.enframHdBase(9);
            return;
        }// end function

        private function enframHdBase(param1:int) : void
        {
            var _loc_4:GTextFiled = null;
            var _loc_2:* = ClockManager.instance.nowDate;
            var _loc_3:* = Cache.instance.fashion.getFashionExpiredTime(param1) - _loc_2.time / 1000;
            if (_loc_3 > 0)
            {
                _loc_4 = this["mountsInfoTxt" + param1] as GTextFiled;
                _loc_4.htmlText = this._pressDesObj[param1] + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getResTimeStr(_loc_3), "#ff0000");
            }
            else
            {
                this.refresh();
            }
            return;
        }// end function

        private function getResTimeStr(param1:int) : String
        {
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_2:String = "";
            if (param1 > 0)
            {
                _loc_3 = param1 / 3600;
                _loc_4 = param1 / 60 % 60;
                _loc_5 = param1 % 60;
                _loc_2 = _loc_2 + (_loc_3 < 10 ? ("0" + _loc_3) : ("" + _loc_3));
                _loc_2 = _loc_2 + ":";
                _loc_2 = _loc_2 + (_loc_4 < 10 ? ("0" + _loc_4) : ("" + _loc_4));
                _loc_2 = _loc_2 + ":";
                _loc_2 = _loc_2 + (_loc_5 < 10 ? ("0" + _loc_5) : ("" + _loc_5));
            }
            return _loc_2;
        }// end function

        private function getMountLeftTime() : String
        {
            var _loc_1:* = BestUtil.getMountBlessTime();
            return this.getResTimeStr(_loc_1);
        }// end function

        private function getPetLeftTime() : String
        {
            var _loc_1:* = BestUtil.getPetBlessTime();
            return this.getResTimeStr(_loc_1);
        }// end function

        private function freshWPC(param1:int, param2:Boolean = true) : void
        {
            var _loc_7:BestRecommendData = null;
            var _loc_3:* = BestUtil.getWPCInfoByType(param1);
            var _loc_4:* = this["mountsInfoTxt" + param1] as GTextFiled;
            var _loc_5:* = this.txtDesObj[_loc_4];
            var _loc_8:* = _loc_3[0];
            _loc_4.visible = _loc_3[0];
            _loc_5.visible = _loc_8;
            _loc_5.htmlText = _loc_3[4];
            var _loc_6:* = this._frameObj[param1] as SecTimer;
            if (_loc_6 == null)
            {
                var _loc_8:* = new SecTimer(1);
                this._frameObj[param1] = new SecTimer(1);
                _loc_6 = _loc_8;
                _loc_6.addListener(TimerType.ENTERFRAME, this["onEnterF" + param1] as Function);
            }
            if (_loc_3[3])
            {
                _loc_6.start();
            }
            else
            {
                _loc_6.stop();
            }
            if (_loc_3[0])
            {
                if (_loc_3[3])
                {
                    _loc_7 = _loc_3[2];
                    if (_loc_7)
                    {
                        _loc_4.htmlText = "" + _loc_3[1] + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getResTimeStr(_loc_7.blessLeftTime), "#ff0000");
                    }
                }
                else
                {
                    _loc_4.htmlText = "" + _loc_3[1];
                }
                _loc_4.Data = _loc_3[2];
                this._pressDesObj[param1] = _loc_3[1];
            }
            if (param2)
            {
                this.relayout();
            }
            return;
        }// end function

        private function fresh60S(param1:SecTimer) : void
        {
            if (this.checkLevelEnougth())
            {
                this.refresh();
            }
            return;
        }// end function

        private function checkLevelEnougth() : Boolean
        {
            var _loc_1:* = Cache.instance.role.roleEntityInfo.entityInfo.level;
            if (_loc_1 >= GameDefConfig.instance.getSystemOpenLevel(46))
            {
                return true;
            }
            return false;
        }// end function

        public function freshEquip(param1:Boolean = true) : void
        {
            this.freshBase(1, param1);
            return;
        }// end function

        public function freshGem(param1:Boolean = true) : void
        {
            this.freshBase(2, param1);
            return;
        }// end function

        public function freshWizards(param1:Boolean = true) : void
        {
            this.freshBase(3, param1);
            return;
        }// end function

        public function freshSkill(param1:Boolean = true) : void
        {
            this.freshBase(4, param1);
            return;
        }// end function

        public function freshPet(param1:Boolean = true) : void
        {
            var _loc_2:* = BestUtil.getPetsInfo();
            var _loc_3:* = _loc_2[0];
            this.petsInfoTxt.visible = _loc_2[0];
            this.petsInfoTxtDes.visible = _loc_3;
            this.petsInfoTxtDes.htmlText = _loc_2[4];
            if (_loc_2[3])
            {
                this._petFrame.start();
            }
            else
            {
                this._petFrame.stop();
            }
            if (_loc_2[0])
            {
                if (_loc_2[3])
                {
                    this.petsInfoTxt.htmlText = "" + _loc_2[1] + HTMLUtil.addColor("\n" + Language.getString(71393) + "" + this.getPetLeftTime(), "#ff0000");
                }
                else
                {
                    this.petsInfoTxt.htmlText = "" + _loc_2[1];
                }
                this.petsInfoTxt.Data = _loc_2[2];
                this._petPressDes = _loc_2[1];
            }
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        public function freshShop(param1:Boolean = true) : void
        {
            var _loc_2:* = BestUtil.getShopInfo();
            var _loc_3:* = _loc_2[0];
            this.shopInfoTxt.visible = _loc_2[0];
            this.shopInfoTxtDes.visible = _loc_3;
            this.shopInfoTxtDes.htmlText = _loc_2[4];
            this.shopInfoTxt.Data = _loc_2[2];
            if (_loc_2[0])
            {
                this.shopInfoTxt.htmlText = "" + _loc_2[1];
            }
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        public function freshCityTax(param1:Boolean = true) : void
        {
            var _loc_2:* = BestUtil.getCityTaxInfo();
            var _loc_3:* = _loc_2[0];
            this.cityTaxInfoTxt.visible = _loc_2[0];
            this.cityTaxInfoTxtDes.visible = _loc_3;
            this.cityTaxInfoTxtDes.htmlText = _loc_2[4];
            this.cityTaxInfoTxt.Data = _loc_2[2];
            if (_loc_2[0])
            {
                this.cityTaxInfoTxt.htmlText = "" + _loc_2[1];
            }
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        public function freshExpCopy(param1:Boolean = true) : void
        {
            var _loc_2:* = BestUtil.getExpCopyInfo();
            var _loc_3:* = _loc_2[0];
            this.expCopyInfoTxt.visible = _loc_2[0];
            this.expCopyInfoTxtDes.visible = _loc_3;
            this.expCopyInfoTxtDes.htmlText = _loc_2[4];
            this.expCopyInfoTxt.Data = _loc_2[2];
            if (_loc_2[0])
            {
                this.expCopyInfoTxt.htmlText = "" + _loc_2[1];
            }
            if (param1)
            {
                this.relayout();
            }
            return;
        }// end function

        private function initFunObj() : void
        {
            this.funObj = {};
            this.funObj[this.baseIndex] = BestUtil.getEquipsInfo;
            this.funObj[(this.baseIndex + 1)] = BestUtil.getGemsInfo;
            this.funObj[this.baseIndex + 2] = BestUtil.getWizardsInfo;
            this.funObj[this.baseIndex + 3] = BestUtil.getSkillsInfo;
            this.funObj[this.baseIndex + 4] = BestUtil.getPetsInfo;
            return;
        }// end function

        private function freshBase(param1:int, param2:Boolean = true) : void
        {
            var _loc_4:Array = null;
            var _loc_5:GTextFiled = null;
            var _loc_6:GTextFiled = null;
            var _loc_3:* = this.funObj[this.baseIndex + param1 - 1];
            if (_loc_3 != null)
            {
                _loc_4 = this._loc_3();
                _loc_5 = this.txtList[this.baseIndex + param1 - 1];
                _loc_6 = this.txtDesObj[_loc_5];
                if (_loc_5)
                {
                    var _loc_7:* = _loc_4[0];
                    _loc_5.visible = _loc_4[0];
                    _loc_6.visible = _loc_7;
                    _loc_5.htmlText = "" + _loc_4[1];
                    _loc_5.Data = _loc_4[2];
                    _loc_6.htmlText = _loc_4[4];
                }
            }
            if (param2)
            {
                this.relayout();
            }
            return;
        }// end function

        private function relayout() : void
        {
            var _loc_4:GTextFiled = null;
            var _loc_5:GTextFiled = null;
            var _loc_1:* = this.txtList;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_6:int = 0;
            while (_loc_6 < _loc_1.length)
            {
                
                _loc_4 = _loc_1[_loc_6];
                _loc_5 = this.txtDesObj[_loc_4];
                _loc_5.visible = _loc_1[_loc_6].visible;
                if (_loc_1[_loc_6].visible)
                {
                    _loc_1[_loc_6].height = 20 * _loc_1[_loc_6].numLines;
                    _loc_1[_loc_6].y = _loc_2;
                    _loc_2 = _loc_2 + (_loc_1[_loc_6].textHeight + 5);
                    _loc_3++;
                }
                else
                {
                    _loc_1[_loc_6].y = 0;
                }
                _loc_5.y = _loc_4.y;
                _loc_5.x = 0;
                _loc_6++;
            }
            this._pane.update();
            this._pane.drawNow();
            return;
        }// end function

    }
}
